﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BusinessObjects;
using DemoObject;
using DemoObject.EntityMappers;

public partial class Controls_menutop : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            TblMenuType item = TblMenuTypeRepository.CreateInstant().SelectOne("menu-top");
            if (item != null)
            {
                HashSet<string> hs = new HashSet<string>();
                hs.Add("DisplayOrder ASC");
                IList<TblMenu> ls = TblMenuRepository.CreateInstant().SelectListItem(null, null, item.Id, "", true, hs);
                rptMenuTop.DataSource = ls;
                rptMenuTop.DataBind();
            }
        }
    }
}
